Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Feb 18, 2024

Description

Initially to prevent issues with a few PHPUnit versions which were around in the early days of PHP 8.0, where these would accidentally be seen as parameter names.

So, as a best practice, when using keys in data sets, the keys should match the parameter names of the receiving test method.

An ulterior reason to make this change is that PHPUnit 11 will always treat the keys as parameter names, so this can be seen as a preparation step for allowing for PHPUnit 11 support in PHPCS 4.0.

Suggested changelog entry

N/A

Related issues/external references

Loosely related to #25

Initially to prevent issues with a few PHPUnit versions which were around in the early days of PHP 8.0, where these would accidentally be seen as parameter names.

So, as a best practice, when using keys in data sets, the keys should match the parameter names of the receiving test method.

An ulterior reason to make this change is that PHPUnit 11 will always treat the keys as parameter names, so this can be seen as a preparation step for allowing for PHPUnit 11 support in PHPCS 4.0.
@jrfnl jrfnl added this to the 3.9.x Next milestone Feb 18, 2024
@jrfnl jrfnl merged commit fbde507 into master Feb 18, 2024
@jrfnl jrfnl deleted the feature/tests-fix-up-a_few-dataproviders branch February 18, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant